﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

public partial class _Default : System.Web.UI.Page
{
    private int pageIndex
    {
        get
        {
            if (Request.Params["page"] == null)
                return 1;
            else
            {
               return int.Parse(Request.Params["page"]);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Bind();
    }
    private void Bind()
    {
        int pageCount,Counts;
        List<Model.USERS> l = new BLL.USERS().GetList(20, pageIndex,"USERS_CODE",false,"", out pageCount, out Counts);
        USERSListControl1.Bind(l);
        PageControl1.Bind(pageIndex, 20, Counts, Request.Url.ToString(), "page");

    }
}
